<?php

namespace App\Http\Controllers\Blog;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Article;

class ArchivesController extends Controller
{
    protected $model_article;
    public function __construct(Article $article)
    {
        $this->model_article = $article;
    }
    public function index()
    {
        return view('blog.archives');
    }

    /**
     * 文章详情
     * @param $id int 文章ID
     * @return mixed
     * */
    public function Details($id)
    {
        $article_info = $this->model_article->getInfo($id);
        return view('blog.details', ['article_info' => $article_info]);
    }
}
